//滑动验证需要引入的JS
var nc = new noCaptcha();
var nc_appkey = 'FFFF000000000177B889';
var nc_scene = 'login';
var nc_token = [nc_appkey, (new Date()).getTime(), Math.random()].join(':');
var nc_option = {
    renderTo: '#dom_id',
    appkey: nc_appkey,
    scene: nc_scene,
    token: nc_token,
    trans: '{"name1":"code100"}',
    callback: function (data) {
        document.getElementById('csessionid').value = data.csessionid;
        document.getElementById('sig').value = data.sig;
        document.getElementById('token').value = nc_token;
        document.getElementById('scene').value = nc_scene;
    }
};
nc.init(nc_option);
document.onkeydown = function (event) {
    var e = event || window.event || arguments.callee.caller.arguments[0];
    if (e && e.keyCode == 13) {
        login();
    }
};



//前台js验证滑动验证、以及登录
//$('#adminLogin').submit(function () {
//    var csessionid = $("#csessionid").val();
//    var sig = $("#sig").val();
//    var token = $("#token").val();
//    var scene = $("#scene").val();
//    if (!csessionid && !sig && !token && !scene) {
//        layer.msg('请滑动滑动验证');
//        return false;
//    }
//});
